package xkp.lesson4;

public class LazyInstance {
	//此处的实例只在第一次有人用时实例化
	//此处时懒汉式单例模式
	private static LazyInstance instance;
	
	private LazyInstance() {};
	
	
	public static LazyInstance getInstance() {
		if(instance == null) {
			instance = new LazyInstance();
		}
		
		return instance;
	}

}
